import Vue from 'vue'
import Router from 'vue-router'
import Login from '@/page/login/Login'
import Register from '@/page/register/register'
import Index from '@/page/index/index'
import resetPwd from '@/page/resetPwd/resetPwd'
import UserInfoDetail from '@/page/userInfoDetail/userInfoDetail'
import MusicPlay from '@/page/musicPlay/musicPlay'
import IndexPage from '@/page/indexPage/indexPage'
import IndexPageView from '@/page/indexPage/indexPage-view'

Vue.use(Router)

const router = {
  routes: [
    {
      path: '/',
      component: Index,
      name: 'Index',
      meta: { title: '首页' },
      redirect: { name: 'Index' }
    },
    {
      path: '/index',
      component: Index,
      name: 'Index',
      meta: { title: '首页' }
    },
    {
      path: '/login',
      name: 'Login',
      component: Login,
      meta: { title: '登录' }
    },
    {
      path: '/register',
      name: 'register',
      component: Register,
      meta: { title: '注册' }
    },
    {
      path: '/resetPwd',
      name: 'resetPwd',
      component: resetPwd,
      meta: { title: '修改密码' }
    },
    {
      path: '/userInfoDetail',
      name: 'userInfoDetail',
      component: UserInfoDetail,
      meta: { title: '用户详细信息' }
    },
    {
      path: '/musicPlay',
      name: 'musicPlay',
      component: MusicPlay,
      meta: { title: '音乐详情' }
    },
    {
      path: '/indexPage',
      name: 'indexPage',
      component: IndexPage,
      meta: { title: '优化首页' }
    },
    {
      path: '/indexPage-view',
      name: 'indexPageView',
      component: IndexPageView,
      meta: { title: '优化首页' }
    }
  ]
}

export default router
